//
//  HDSIMJudge.m
//  HDWuDaDaoServiceCenter
//
//  Created by HDNiuKuiming on 2017/5/13.
//  Copyright © 2017年 HDNiuKuiming. All rights reserved.
//

#import "HDSIMJudge.h"
#import <CoreTelephony/CTTelephonyNetworkInfo.h>
#import <CoreTelephony/CTCarrier.h>

@implementation HDSIMJudge

// 判断设备是否安装sim卡
+ (BOOL)isSIMInstalled
{
    CTTelephonyNetworkInfo *networkInfo = [[CTTelephonyNetworkInfo alloc] init];
    CTCarrier *carrier = [networkInfo subscriberCellularProvider];
    
    if (!carrier.isoCountryCode) {
        NSLog(@"No sim present Or No cellular coverage or phone is on airplane mode.");
        return NO;
    }
    return YES;
}

@end
